package com.example.markingsystem.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.view.RedirectView;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
import java.util.Map;

@RestController
public class WechatLoginController {

    private static final String APP_ID = "wxe55cc3e4ab75907b";
    @GetMapping("/wechat/verification")
    public String toindex2(String signature,String timestamp,String nonce,String echostr) throws NoSuchAlgorithmException {
        System.out.println(signature);
        System.out.println(echostr);
        System.out.println(timestamp);
        System.out.println(nonce);

        return echostr;
    }


    //之前的代码放在这里
}

